<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素</title>
    <style>
        .container{
            max-width: 600px;/*适配 移动端用自己的宽度 PC端 mw*/
            margin: 0 auto;/*左右水平居中*/
            padding: 20px;
            font-family: 'Arial', sans-serif;
        }
        h1{
            text-align: center;
        }
        p{
            line-height: 1.6;
        }
        .more{
            /* 格式化上下文 定义元素的布局规则 */
            font-size: 18px;
            display: inline-block;
            text-align: center;
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            position: relative;
            transition: all 0.3s ease;
            text-decoration: none;
            border-radius: 5px;
        }
        .more::before{
            content: '';
            position: absolute;
            bottom:0;
            left: 0;
            width:100%;
            height: 2px;
            background-color: #fff;
            transform: scaleX(0);
            transition: transform 0.3s ease;
            transform-origin: bottom left;
        }
        .more:hover::before{
            transform: scaleX(1);
        }
        .more::after{
            display: inline-block;
            content:"\2192";
            margin-left:5px;
            transition:transform .3s ease;
        }
        .more:hover::after{
            transform: translateX(5px);

        }
    </style>
</head>
<body>
     <div class="container">
    <h1>示例标题</h1>
    <p>这是一个段落，</p>
    <a href="#" class="more">查看更多</a>
  </div>
</body>
</html>